package com.cswangdao.mapper;

import com.cswangdao.domain.dto.AdminPageDTO;
import com.cswangdao.domain.model.MarketAdmin;
import com.cswangdao.domain.po.Admin;
import com.cswangdao.domain.vo.AdminPageVo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface MarketAdminMapper {

    /**
     * @description: 登录验证
     * @param: username
     * @return:  Admin
     */
    Admin login(@Param("username") String username);


    /**
     * @description: 登录信息返回
     * @param: adminId
     * @return: Admin
     */
    Admin getAdminInfoById(@Param("adminId") Integer adminId);

    Page<MarketAdmin> pageQueryInfo(AdminPageDTO pageDTO);

    void addAdmin(MarketAdmin admin);

    void updateById(MarketAdmin admin);

    @Delete("delete from market_admin where id = #{id}")
    void deleteById(Integer id);
}